#                                               -*- Autoconf -*-
# Process this file with autoconf to produce a configure script.

AC_PREREQ([2.63])
AC_INIT([FULL-PACKAGE-NAME], [VERSION], [BUG-REPORT-ADDRESS])
AC_CONFIG_SRCDIR([config.h.in])
AC_CONFIG_HEADERS([config.h])
AM_INIT_AUTOMAKE

# Checks for programs.
AC_PROG_CXX
AC_PROG_CC

AC_PROG_LIBTOOL

AC_ARG_VAR([WEBDIR],[eACS base directory])
AS_IF([test "x$WEBDIR" == "x"],[WEBDIR=/var/eacs])

# Checks for libraries.
AC_CHECK_LIB([log4cplus], [main])
AC_CHECK_LIB([boost_regex], [main])
AC_CHECK_LIB([boost_thread], [main])
AC_CHECK_LIB([boost_filesystem], [main])

# Checks for header files.
AC_CHECK_HEADERS([arpa/inet.h netdb.h netinet/in.h sys/file.h sys/ioctl.h sys/socket.h sys/time.h syslog.h])

# Checks for typedefs, structures, and compiler characteristics.
AC_HEADER_STDBOOL
AC_C_INLINE
AC_TYPE_PID_T
AC_TYPE_SIZE_T

# Checks for library functions.
AC_FUNC_ERROR_AT_LINE
AC_FUNC_MALLOC
AC_FUNC_REALLOC
AC_CHECK_FUNCS([gethostbyname gettimeofday inet_ntoa memset mkdir select socket strerror strtol strtoull])

AC_CONFIG_FILES([Makefile
                 src/Makefile
                 ])
AC_OUTPUT
